 /*
  *@(#)AdSpider.java		8 Sept. 2000
  *
  * Copyright: MetaPlus Inc & Inquiry Management Systems Ltd.  2000
  *
  * This software is the proprietary information of MetaPlus Inc & 
  * Inquiry Management Systems Ltd.  
  * Use is subject to license terms.
  */
package com.ims.iaa;

import java.rmi.Remote;
import java.rmi.RemoteException;

/** 
  *
  * This interface <code>AdSpider</code> define the behavior of a web 
  * advertisement search spider. 
  * This interface extends the <code>java.rmi.Remote</code>interface.
  * The ads search spider can be notified to 
  * perform ads search request, cancel the process of request, terminate the 
  * execution and get/set its name.
  *
  * @see AdSpiderImpl
  *
  * @author Anthony Zhang
  *
  * @version 1.00, 25 Sept. 2000
  */
public interface AdSpider extends Remote {

    /**
      * This method is called by the Spider Control Center to notify the spider
	  * to perform the specific request.
	  *
	  * @param adTrackReq The request need to be preformed by the spider.
	  *
      * @return Boolean flag indicate succefully notified or not
      *
	  * @see AdSpiderImpl#notifyPerform
      */
	public boolean notifyPerform(AdTrackRequest adTrackReq) 
		throws RemoteException;	
		
    /**
      * This method is called by the Spider Control Center to notify the spider
	  * to cancel the specific request.
	  *
	  * @param adTrackReq The request need to be cancelled.
	  *
      * @return void
      *
	  * @see AdSpiderImpl#notifyCancel
      */	
	/*public void notifyCancel(AdTrackRequest adTrackReq) 
		throws RemoteException;*/
		
    /**
      * This method is called by the Spider Crawler to notify the spider
	  * to do some cleanup before it terminate.
	  *
      * @return void
      *
	  * @see AdSpiderImpl#notifyTerminate
      */		
	public void notifyTerminate() 
		throws RemoteException;
		
    /**
      * This method is called by the Spider Control Center to get the spider
	  * name in order to distingush different spider.
	  *
      * @return String of spider name
      *
	  * @see AdSpiderImpl#getSpiderName
      */		
	public String getSpiderName() 
		throws RemoteException;
	
	//public boolean isNewSpider()
	//	throws RemoteException;
		
    /**
      * This method is called by the Spider Control Center to give the spider
	  * a unique number to append after its name.
	  * 
	  *
	  * @param count A count number which will be appended after the spider name
	  * seperated with a '-' character.
	  * 
	  * change by ShengMengBai, we change Spider name type.
	  *
      * @return void
      *
	  * @see AdSpiderImpl#setSpiderName
      */			
	//public void setSpiderName() 
	//    throws RemoteException;	
}	